import React from 'react';

const Home = React.lazy(() => import('../View/Home'));
const Login = React.lazy(() => import('../View/Login'));
const Index = React.lazy(() => import('../View/child/Index'));
const Mend = React.lazy(() => import('../View/child/Mend'));
const My = React.lazy(() => import('../View/child/My'));
const Register = React.lazy(() => import('../View/Register'));

let routeList = [
    {
        path:"/home",
        component:Home,
        children:[
            {
                isRequired:true,
                path:"/home/index",
                name:"工作台",
                component:Index,
            },
            {
                path:"/home/mend",
                name:"页面管理",
                component:Mend,
            },
            {
                path:"/home/my",
                name:"知识小册",
                component:My,
            },
        ]
    },
    {
        path:"/login",
        component:Login,
    },
    {
        path:"/register",
        component:Register,
    },
    {
        to:"/home/index",
        from:"/",
    },
]
export default routeList;